home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / v cisle / htttrack / httrack-3.41-3.exe / {app} / src / htsftp.h < prev    next >
C/C++ Source or Header  |  2006-07-29  |  3KB  |  88 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: basic FTP protocol manager .h                          */
  34. /* Author: Xavier Roche                                         */
  35. /* ------------------------------------------------------------ */
  36.  
  37.  
  38. #ifndef HTSFTP_DEFH
  39. #define HTSFTP_DEFH 
  40.  
  41. #include "htsbase.h"
  42. #include "htsbasenet.h"
  43. #include "htsthread.h"
  44.  
  45. /* Forward definitions */
  46. #ifndef HTS_DEF_FWSTRUCT_lien_back
  47. #define HTS_DEF_FWSTRUCT_lien_back
  48. typedef struct lien_back lien_back;
  49. #endif
  50. #ifndef HTS_DEF_FWSTRUCT_httrackp
  51. #define HTS_DEF_FWSTRUCT_httrackp
  52. typedef struct httrackp httrackp;
  53. #endif
  54.  
  55. /* Download structure */
  56. #ifndef HTS_DEF_FWSTRUCT_FTPDownloadStruct
  57. #define HTS_DEF_FWSTRUCT_FTPDownloadStruct
  58. typedef struct FTPDownloadStruct FTPDownloadStruct;
  59. #endif
  60. struct FTPDownloadStruct {
  61.     lien_back *pBack;
  62.     httrackp *pOpt;
  63. };
  64.  
  65. /* Library internal definictions */
  66. #ifdef HTS_INTERNAL_BYTECODE
  67. #if USE_BEGINTHREAD
  68. void launch_ftp(FTPDownloadStruct *params);
  69. void back_launch_ftp( void* pP );
  70. #else
  71. void launch_ftp(FTPDownloadStruct *params,char* path,char* exec);
  72. int back_launch_ftp(FTPDownloadStruct *params);
  73. #endif
  74.  
  75. int run_launch_ftp(FTPDownloadStruct *params);
  76. int send_line(T_SOC soc,char* data);
  77. int get_ftp_line(T_SOC soc,char* line,int timeout);
  78. T_SOC get_datasocket(char* to_send);
  79. int stop_ftp(lien_back* back);
  80. char* linejmp(char* line);
  81. int check_socket(T_SOC soc);
  82. int check_socket_connect(T_SOC soc);
  83. int wait_socket_receive(T_SOC soc,int timeout);
  84. #endif
  85.  
  86. #endif
  87.  
  88.